import { getAuthorization, setAuthorization } from "@/utils/auth.js"
// 获取首页发现 ?PageIndex=2&PageSize=20
export const RecommendUsers = () => {
    let userInfoId = getAuthorization('userId')
    let url = '/app/api/G/user-heibai/v1/UserInfo/'+ userInfoId +'/RecommendUsers'
    return url
}

// 首页附近
export const NearbyUsers = () => {
    let userInfoId = getAuthorization('userId')
    let url = '/app/api/G/user-heibai/v1/UserInfo/'+ userInfoId +'/NearbyUsers'
    return url
}

// 广场关注 /app/api/G/user-heibai/v1/Trend/Follow?PageIndex=1&UserId=151743&PageSize=20
export const TrendFollow = '/app/api/G/user-heibai/v1/Trend/Follow'

// 广场推荐
// export const Trend = '/app/api/G/user-heibai/v1/Trend?PageIndex=3&UserId=151743&PageSize=20'
export const Trend = '/app/api/G/user-heibai/v1/Trend'

// 广场附近
// export const Nearby = '/app/api/G/user-heibai/v1/Trend/nearby?PageIndex=2&PageSize=20'
export const TrendNearby = '/app/api/G/user-heibai/v1/Trend/nearby'

// 获取某一条动态数据
export const TrendOne = '/app/api/G/user-heibai/v1/Trend/'

// 获取某一条动态的评论列表
export const TrendOneComments = '/app/api/G/user-heibai/v1/Trend/'
// /app/api/G/user-heibai/v1/Trend/252915/Comments?PageIndex=1&UserId=151743&PageSize=20

// 获取用户的会员状态
export const UserExpandState = '/app/api/G/user-heibai/v1/UserExpand?itemName=TQ_COMMENTNUM'

// 获取动态详情
export const VisitorUser = '/app/api/G/user-heibai/v1/CurrentUser/VisitorUser'

// 发送 回复 评论 
export const sendComent = (toUserId,text,userId,hfUserId = 0) => {
    return '/app/api/G/user-heibai/v1/Trend/'+ toUserId +'/Comments/'+ hfUserId +'?text='+ text +'&userId=' + userId
}

// 评论点赞
export const sendComentZan = (toUserId,userId) => {
    return '/app/api/G/user-heibai/v1/Trend/Comments/'+ toUserId +'/LikeOrStep?userId='+ userId +'&likeType=0'
}


//获取banner
export const getBanner = '/app/api/G/user-heibai/v1/Banner'

// 点赞
export const likeTo = (id,data) => {
    return '/app/api/G/user-heibai/v1/Trend/'+ id +'/LikeOrStep?userId='+ data.userId +'&likeType=' + data.likeType
}

// /app/api/G/user-heibai/v1/Trend/252910/LikeOrStep?userId=151889&likeType=0